﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Utils;

namespace BO
{
    /// <summary>
    /// 生成代码调用工厂
    /// </summary>
    public class MakeCodeFactory
    {
        /// <summary>
        /// 生成
        /// </summary>
        public static void MakeCode(BaseBO bo)
        {
            string defaultTemp = SetConfig.GetDefaultTempate();
            switch (defaultTemp)
            {
                case "javaDefault/appMyBatis":
                case "javaDefault/appMyBatisSpring":
                    bo.MakeCodeForJavaDefaultBatis();
                    break;
                case "javaDefault/appHibernate":
                    bo.MakeCodeForJavaDefaultHib();
                    break;
                case "javaDefault/oaMybatisSpring":
                    bo.MakeCodeForJavaOA();
                    break;
                default:
                    MessageBox.Show("默认模板设置错误:" + defaultTemp+" 该模板无系统实现方法!");
                    break;
            }
        }
    }
}
